App({
  globalData: {
    useInfo: null,
    statusBarHeight: 0,
    navTop: 0,
    navHeigh: 0,
    menuButtonBoundingHeight: 0,
    windowsHeight: 0
  },
  /**
   * 当小程序初始化完成时，会触发 onLaunch（全局只触发一次）
   */
  onLaunch: function () {
    // 云开发配置
    if(wx.cloud){
       wx.cloud.init({
      // 云环境的ID
      env: 'ace-shzj-3gttwpg51fe408cc',
      traceUser: true
    })
    }
    wx.getSystemInfo({
      success: (res) => {
        this.globalData.statusBarHeight = res.statusBarHeight;
        this.globalData.navTop = wx.getMenuButtonBoundingClientRect().top;
        this.globalData.menuButtonBoundingHeight = wx.getMenuButtonBoundingClientRect().height;
        this.globalData.navHeight = this.globalData.statusBarHeight + wx.getMenuButtonBoundingClientRect().height + (this.globalData.navTop - this.globalData.statusBarHeight) * 2;
        this.globalData.windowsHeight = res.screenHeight;
        console.log(this.globalData.menuButtonBoundingHeight);
        console.log(this.globalData.statusBarHeight);
        console.log(this.globalData.navTop);
        console.log(this.globalData.navHeight);
      }
    })
  },

  /**
   * 当小程序启动，或从后台进入前台显示，会触发 onShow
   */
  onShow: function (options) {

  },

  /**
   * 当小程序从前台进入后台，会触发 onHide
   */
  onHide: function () {

  },

  /**
   * 当小程序发生脚本错误，或者 api 调用失败时，会触发 onError 并带上错误信息
   */
  onError: function (msg) {


  },


    

 

})
